﻿<%@ Page Language="C#" MasterPageFile="~/cms/defaultLayout.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="cms_default" %>

<%@ MasterType VirtualPath="~/cms/defaultLayout.master" %>
<asp:Content ID="mainContent" ContentPlaceHolderID="main" runat="server">
    <div class="content">
        <div class="buttons"><center>
                <a id="A1" class="" runat="server" href="~/cms/film"><asp:Label ID="lblFilm" runat="server"/><b>[Film]</b></a> -
                <a id="A2" class="" runat="server" href="~/cms/planning"><asp:Label ID="lblplanning" runat="server" />[Planning]</a> -
                <a id="A3" class="" runat="server" href="~/cms/account"><asp:Label ID="lblAccount" runat="server"/>[Account]</a> -
                <a id="A4" class="" runat="server" href="~/cms/abonnement"><asp:Label ID="lblAbonnement" runat="server" />[Abonnement]</a> -
                <a id="A5" class="" runat="server" href="~/cms/zaal"><asp:Label ID="lblZaal" runat="server"/>[Zaal]</a> -
                <a id="A6" class="" runat="server" href="~/cms/vestiging"><asp:Label ID="lblVestiging" runat="server" />[Vestiging]</a> -
                <a id="A7" class="" runat="server" href="~/cms/user"><asp:Label ID="lblUser" runat="server"/>[User]</a> - 
               <a id="A8" class="" runat="server" href="~/cms/kaarten"><asp:Label ID="lblKaarten" runat="server"/>[Kaarten]</a>
                </center>
            </div>
        <p> This is "Film" of CMS</p>      <form id="films_form" runat="server">
            <div class="cms_view" dir="ltr">

                <asp:Button ID="Button1" runat="server" OnClick="Button1_Click" Text="New" />&nbsp;
                 <asp:Button ID="Button2" runat="server" Text="Cancel" OnClick="Button2_Click" />&nbsp;
                     <br /><br />

                <asp:GridView ID="FilmGridView" runat="server" DataSourceID="Film_Select" AutoGenerateColumns="False" DataKeyNames="film_id" OnSelectedIndexChanged="FilmGridView_SelectedIndexChanged" BackColor="White" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" CellPadding="3" ForeColor="Black" GridLines="Both">
                    <AlternatingRowStyle BackColor="#CCCCCC"></AlternatingRowStyle>
                    <Columns>
                        <asp:CommandField ShowSelectButton="True" ButtonType="Button"></asp:CommandField>
                        <asp:BoundField DataField="naam" HeaderText="Naam" SortExpression="naam"></asp:BoundField>
                        <%-- <asp:ButtonField ButtonType="Link" CommandName="Select" DataTextField="naam" HeaderText="Naam" SortExpression="naam"></asp:ButtonField>--%>
                    </Columns>
                    <FooterStyle BackColor="#CCCCCC"></FooterStyle>

                    <HeaderStyle BackColor="Black" Font-Bold="True" ForeColor="White"></HeaderStyle>

                    <PagerStyle HorizontalAlign="Center" BackColor="#999999" ForeColor="Black"></PagerStyle>

                    <SelectedRowStyle BackColor="#000099" Font-Bold="True" ForeColor="White"></SelectedRowStyle>

                    <SortedAscendingCellStyle BackColor="#F1F1F1"></SortedAscendingCellStyle>

                    <SortedAscendingHeaderStyle BackColor="#808080"></SortedAscendingHeaderStyle>

                    <SortedDescendingCellStyle BackColor="#CAC9C9"></SortedDescendingCellStyle>

                    <SortedDescendingHeaderStyle BackColor="#383838"></SortedDescendingHeaderStyle>
                </asp:GridView>
                <br />
                <hr />
                <br />

                <script runat="server">                     
                    
                   
                </script>
                <%--OnDataBound="FilmDetailsOverview_DataBound"--%>
                <asp:DetailsView ID="FilmDetailsOverview" runat="server" DataSourceID="Film_Details" DataKeyNames="film_id" OnItemInserted="FilmDetailsOverview_ItemInserted" OnItemUpdated="FilmDetailsOverview_ItemUpdated" OnItemDeleted="FilmDetailsOverview_ItemDeleted" CellPadding="4" ForeColor="#333333" GridLines="Horizontal" OnItemUpdating="FilmDetailsOverview_ItemUpdating" OnItemInserting="FilmDetailsOverview_ItemInserting" OnItemDeleting="FilmDetailsOverview_ItemDeleting" AutoGenerateRows="False">
                    <CommandRowStyle BackColor="#C5BBAF" Font-Bold="True" />

                    <%-- Edit overview --%>
                    <EditRowStyle BackColor="#7C6F57" />
                    <%-- Insert overview --%>
                    <InsertRowStyle BackColor="#669999" />

                    <%-- Data overview --%>
                    <RowStyle BackColor="#E3EAEB" />
                    <%-- Different color for rowstyle --%>
                    <AlternatingRowStyle BackColor="White" />

                    <%-- Header overview --%>
                    <FieldHeaderStyle BackColor="#D0D0D0" Font-Bold="True" />
                    <%-- Header 2 overview --%>
                    <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />

                    <Fields>
                        <asp:BoundField HeaderText="film_id" DataField="film_id" InsertVisible="False" ReadOnly="True" SortExpression="film_id"></asp:BoundField>
                        <asp:TemplateField HeaderText="Naam" SortExpression="naam">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtNaam" runat="server" Text='<%# Bind("naam") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="naamRequiredValidator" runat="server" ControlToValidate="txtNaam" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtNaam" runat="server" Text='<%# Bind("naam") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="naamRequiredValidator" runat="server" ControlToValidate="txtNaam" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblNaam" runat="server" Text='<%# Bind("naam") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Omschrijving" SortExpression="omschrijving">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtOmschrijving" runat="server" Text='<%# Bind("omschrijving") %>' TextMode="MultiLine" Width="750" Rows="5"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="omschrijvingRequiredValidator" runat="server" ControlToValidate="txtOmschrijving" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtOmschrijving" runat="server" Text='<%# Bind("omschrijving") %>' TextMode="MultiLine" Width="750" Rows="5"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="omschrijvingRequiredValidator" runat="server" ControlToValidate="txtOmschrijving" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="OmschrijvingLabel" runat="server" Text='<%# Bind("omschrijving") %>' Width="750"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Omschrijving [EN]" SortExpression="omschrijving_en">
                            <EditItemTemplate>
                                <asp:TextBox runat="server" Text='<%# Bind("omschrijving_en") %>' ID="txtOmschrijvingEN" TextMode="MultiLine" Width="750" Rows="5"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="omschrijvingRequiredValidator1" runat="server" ControlToValidate="txtOmschrijvingEN" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox runat="server" Text='<%# Bind("omschrijving_en") %>' ID="txtOmschrijvingEN" TextMode="MultiLine" Width="750" Rows="5"></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="omschrijvingRequiredValidator1" runat="server" ControlToValidate="txtOmschrijvingEN" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>      
                           </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label runat="server" Text='<%# Bind("omschrijving_en") %>' ID="txtOmschrijvingEN" Width="750"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Acteurs" SortExpression="acteurs">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtActeurs" runat="server" Text='<%# Bind("acteurs") %>'></asp:TextBox><%--<asp:RangeValidator ID="acteurRangeValidator" runat="server" Type="String" ControlToValidate="txtActeurs" ErrorMessage="Het veld acteurs mag alleen letters bevatten." ForeColor="Red"></asp:RangeValidator>--%>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="acteurRequiredValidator" runat="server" ControlToValidate="txtActeurs" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtActeurs" runat="server" Text='<%# Bind("acteurs") %>'></asp:TextBox>
                                <%-- <asp:RangeValidator  Display="Dynamic" ID="acteurRangeValidator" runat="server" Type="String" ControlToValidate="txtActeurs" ErrorMessage="Het veld acteurs mag alleen letters bevatten."  ForeColor="Red"></asp:RangeValidator>--%>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="acteurRequiredValidator" runat="server" ControlToValidate="txtActeurs" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblActeurs" runat="server" Text='<%# Bind("acteurs") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:CheckBoxField DataField="drie_d" HeaderText="3D" SortExpression="drie_d" />--%>
                        <asp:TemplateField HeaderText="Reggiseur" SortExpression="reggiseur">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtReggiseur" runat="server" Text='<%# Bind("reggiseur") %>'></asp:TextBox>
                                <%--                                <asp:RangeValidator  Display="Dynamic" ID="reggiseurRangeValidator" runat="server" Type="String" ControlToValidate="txtReggiseur" ErrorMessage="Het veld regisseur mag alleen letters bevatten." ForeColor="Red"></asp:RangeValidator>--%>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="reggiseurRequiredValidator" runat="server" ControlToValidate="txtReggiseur" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtReggiseur" runat="server" Text='<%# Bind("reggiseur") %>'></asp:TextBox>
                                <%--                                <asp:RangeValidator  Display="Dynamic" ID="reggiseurRangeValidator" runat="server" Type="String" ControlToValidate="txtReggiseur" ErrorMessage="Het veld regisseur mag alleen letters bevatten." ForeColor="Red"></asp:RangeValidator>--%>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="reggiseurRequiredValidator" runat="server" ControlToValidate="txtReggiseur" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblReggiseur" runat="server" Text='<%# Bind("reggiseur") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CheckBoxField DataField="reserveerbaar" HeaderText="Reserveerbaar" SortExpression="reserveerbaar" />
                        <asp:TemplateField HeaderText="Reserverings percentage" SortExpression="reserverings_percentage">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtPercentage" runat="server" Text='<%# Bind("reserverings_percentage") %>'></asp:TextBox>
                                <asp:RangeValidator Display="Dynamic" ID="percentageRangeValidator" runat="server" ControlToValidate="txtPercentage" ErrorMessage="Het percentage moet tussen de 0 en 100 procent liggen. " Type="Integer" ForeColor="Red" MaximumValue="100" MinimumValue="0"></asp:RangeValidator>

                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtPercentage" runat="server" Text='<%# Bind("reserverings_percentage") %>'></asp:TextBox>
                                <asp:RangeValidator Display="Dynamic" ID="percentageRangeValidator" runat="server" ControlToValidate="txtPercentage" ErrorMessage="Het percentage moet tussen de 0 en 100 procent liggen. " Type="Integer" ForeColor="Red" MaximumValue="100" MinimumValue="0"></asp:RangeValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblPercentage" runat="server" Text='<%# Bind("reserverings_percentage") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CheckBoxField DataField="stoelen_kiezen" HeaderText="Stoelen kiezen" SortExpression="stoelen_kiezen" />
                        <%--<asp:TemplateField HeaderText="Afbeelding uploaden" SortExpression="url">
                            <EditItemTemplate>
                                <asp:FileUpload ID="UploadImages" runat="server" ValidateRequestMode="Enabled" />
                                <asp:Button ID="uploaden" runat="server" Text="UploadButton" OnClick="Upload_Image" />
                                <asp:Label ID="uploadLabel" runat="server" Text=""></asp:Label>
                            </EditItemTemplate>
                        </asp:TemplateField>--%>
                        <asp:TemplateField HeaderText="Rating" SortExpression="rating">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtRating" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="ratingRequiredValidator" runat="server" ControlToValidate="txtRating" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="ratingRangeValidator" runat="server" ControlToValidate="txtRating" ErrorMessage="De rating moet tussen de 0.0 en 10.0 liggen. " Type="Double" ForeColor="Red" MaximumValue="10.0" MinimumValue="0.0" CultureInvariantValues="true"></asp:RangeValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtRating" runat="server" Text='<%# Bind("rating") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="ratingRequiredValidator" runat="server" ControlToValidate="txtRating" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="ratingRangeValidator" runat="server" ControlToValidate="txtRating" ErrorMessage="De rating moet tussen de 0.0 en 10.0 liggen. " Type="Double" ForeColor="Red" MaximumValue="10.0" MinimumValue="0.0" CultureInvariantValues="true"></asp:RangeValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblRating" runat="server" Text='<%# Bind("rating") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Preview" SortExpression="preview">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtPreview" runat="server" Text='<%# Bind("preview") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="previewRequiredValidator" runat="server" ControlToValidate="txtPreview" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtPreview" runat="server" Text='<%# Bind("preview") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="previewRequiredValidator" runat="server" ControlToValidate="txtPreview" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblPreview" runat="server" Text='<%# Bind("preview") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Prijs" SortExpression="prijs">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtPrijs" runat="server" Text='<%# Bind("prijs") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="prijsRequiredValidator" runat="server" ControlToValidate="txtPrijs" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="prijsRangeValidator" runat="server" ControlToValidate="txtPrijs" ErrorMessage="De prijs moet tussen de 0.0 en 20.0 liggen. " Type="Double" ForeColor="Red" MaximumValue="20.0" MinimumValue="0.0" CultureInvariantValues="true"></asp:RangeValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtPrijs" runat="server" Text='<%# Bind("prijs") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="prijsRequiredValidator" runat="server" ControlToValidate="txtPrijs" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="prijsRangeValidator" runat="server" ControlToValidate="txtPrijs" ErrorMessage="De prijs moet tussen de 0.0 en 20.0 liggen. " Type="Double" ForeColor="Red" MaximumValue="20.0" MinimumValue="0.0" CultureInvariantValues="true"></asp:RangeValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblPrijs" runat="server" Text='<%# Bind("prijs") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Link plaatje" SortExpression="url">
                            <ItemTemplate>
                                <%--<asp:Label ID="LinkLabel" runat="server" Text='<%# Eval("url") %>'></asp:Label>--%>
                                <asp:Image ID="LinkLabel" src='<%# Eval("url") %>' runat="server" Width="160" Height="120"/>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:Image ID="ImageFilm" src='<%# Eval("url") %>' runat="server" Width="160" Height="120"/><br />
                                <asp:FileUpload ID="UploadImages" runat="server" ValidateRequestMode="Enabled" />
                                <asp:Button ID="uploaden" runat="server" Text="UploadButton" OnClick="Upload_Image" />
                                <asp:Label ID="uploadLabel" runat="server" Text=""></asp:Label><br />
                                <asp:Label ID="LinkLabel" runat="server" Text='<%# Bind("url") %>' ForeColor="White" Font-Bold="true"></asp:Label>
                                <%--  <asp:RequiredFieldValidator ID="afbeeldingRequiredValidator" runat="server" ControlToValidate="uploadLabel" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>--%>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:FileUpload ID="UploadImages" runat="server" ValidateRequestMode="Enabled" />
                                <asp:Button ID="uploaden" runat="server" Text="UploadButton" OnClick="Upload_Image" />
                                <asp:Label ID="uploadLabel" runat="server" Text="" ForeColor="Black"></asp:Label><br />
                                <asp:Label ID="LinkLabel" runat="server" Text='<%# Bind("url") %>' ForeColor="Black" Font-Bold="true"></asp:Label>
                                <%--<asp:RequiredFieldValidator ID="afbeeldingRequiredValidator" runat="server" ControlToValidate="UploadImages" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>--%>
                            </InsertItemTemplate>
                        </asp:TemplateField>
                        <%--<asp:BoundField HeaderText="Link plaatje" DataField="url" SortExpression="url"></asp:BoundField>--%>
                        <asp:TemplateField HeaderText="Link header plaatje" SortExpression="big_url">
                            <ItemTemplate>
                                <asp:Image ID="ImageFilm2" src='<%# Eval("big_url") %>' runat="server" Width="160" Height="120"/><br />
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:Image ID="ImageFilm2" src='<%# Eval("big_url") %>' runat="server" Width="160" Height="120"/><br />
                                <asp:FileUpload ID="UploadImages2" runat="server" ValidateRequestMode="Enabled" />
                                <asp:Button ID="uploaden2" runat="server" Text="UploadButton" OnClick="Upload_Image2" />
                                <asp:Label ID="uploadLabel2" runat="server" Text=""></asp:Label><br />
                                <asp:Label ID="LinkLabel2" runat="server" Text='<%# Bind("big_url") %>' ForeColor="White" Font-Bold="true"></asp:Label>
                                <%--<asp:TextBox runat="server" Text='<%# Bind("big_url") %>' ID="TextBox1"></asp:TextBox>--%>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                 <asp:FileUpload ID="UploadImages2" runat="server" ValidateRequestMode="Enabled" />
                                <asp:Button ID="uploaden2" runat="server" Text="UploadButton" OnClick="Upload_Image2" />
                                <asp:Label ID="uploadLabel2" runat="server" Text=""></asp:Label><br />
                                <asp:Label ID="LinkLabel2" runat="server" Text='<%# Bind("big_url") %>' ForeColor="Black" Font-Bold="true"></asp:Label>
                                <%--<asp:TextBox runat="server" Text='<%# Bind("big_url") %>' ID="TextBox1"></asp:TextBox>--%>
                            </InsertItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Jaar" SortExpression="jaar">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtJaar" runat="server" Text='<%# Bind("jaar") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="jaarRequiredValidator" runat="server" ControlToValidate="txtJaar" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="jaarRangeValidator" runat="server" ControlToValidate="txtJaar" ErrorMessage="Het jaartal moet tussen 2012 en 2020 liggen." Type="Integer" ForeColor="Red" MaximumValue="2020" MinimumValue="2012"></asp:RangeValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtJaar" runat="server" Text='<%# Bind("jaar") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="jaarRequiredValidator" runat="server" ControlToValidate="txtJaar" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="jaarRangeValidator" runat="server" ControlToValidate="txtJaar" ErrorMessage="Het jaartal moet tussen 2012 en 2020 liggen." Type="Integer" ForeColor="Red" MaximumValue="2020" MinimumValue="2012"></asp:RangeValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="lblJaar" runat="server" Text='<%# Bind("jaar") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:CheckBoxField DataField="coming_soon" HeaderText="Binnenkort" SortExpression="coming_soon"></asp:CheckBoxField>
                        <asp:TemplateField HeaderText="Duur" SortExpression="duur">
                            <EditItemTemplate>
                                <asp:TextBox ID="txtDuur" runat="server" Text='<%# Bind("duur") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="duurRequiredValidator" runat="server" ControlToValidate="txtDuur" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="duurRangeValidator" runat="server" ControlToValidate="txtPercentage" ErrorMessage="De filmduur moet tussen de 0 en 300 minuten liggen." Type="Integer" ForeColor="Red" MaximumValue="300" MinimumValue="0"></asp:RangeValidator>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <asp:TextBox ID="txtDuur" runat="server" Text='<%# Bind("duur") %>'></asp:TextBox>
                                <asp:RequiredFieldValidator Display="Dynamic" ID="duurRequiredValidator" runat="server" ControlToValidate="txtDuur" ErrorMessage="Dit veld moet ingevuld zijn." ForeColor="Red"></asp:RequiredFieldValidator>
                                <asp:RangeValidator Display="Dynamic" ID="duurRangeValidator" runat="server" ControlToValidate="txtPercentage" ErrorMessage="De filmduur moet tussen de 0 en 300 minuten liggen." Type="Integer" ForeColor="Red" MaximumValue="300" MinimumValue="0"></asp:RangeValidator>
                            </InsertItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="txtDuur" runat="server" Text='<%# Bind("duur") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Kijkwijzer" SortExpression="kijkwijzer_id">
                            <ItemTemplate>
                                <asp:CheckBoxList ID="KijkwijzerFilm" runat="server" CssClass="CheckBoxTesterBla" DataSourceID="kijkwijzer_film" DataTextField="kijkwijzer_symbool" AutoPostBack="False" RepeatDirection="horizontal" OnDataBound="KijkwijzerFilm_Databound" Enabled="false">
                                </asp:CheckBoxList>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:CheckBoxList ID="KijkwijzerFilm" runat="server" CssClass="CheckBoxTesterBla" DataSourceID="kijkwijzer_film" DataTextField="kijkwijzer_symbool" AutoPostBack="False" RepeatDirection="horizontal" OnDataBound="KijkwijzerFilm_Databound" Enabled="false">
                                </asp:CheckBoxList>
                                <asp:CheckBoxList ID="KijkwijzerShow" runat="server" CssClass="CheckBoxTester" DataSourceID="Film_Kijkwijzer" DataTextField="kijkwijzer_symbool" DataValueField="kijkwijzer_id" AutoPostBack="False" OnDataBound="KijkwijzerCheck_Databound" RepeatDirection="horizontal">
                                </asp:CheckBoxList>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <%--<asp:Label ID="Label1" runat="server" Text="Kijkwijzer kan pas na dit scherm ingevuld worden"></asp:Label>--%>
                                <asp:CheckBoxList ID="KijkwijzerShow" runat="server" CssClass="CheckBoxTester" DataSourceID="Film_Kijkwijzer" DataTextField="kijkwijzer_symbool" DataValueField="kijkwijzer_id" AutoPostBack="False" OnDataBound="KijkwijzerShow_Databound" RepeatDirection="horizontal">
                                </asp:CheckBoxList>
                            </InsertItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Genre" SortExpression="genre">
                            <ItemTemplate>
                                <asp:CheckBoxList ID="GenreFilm" runat="server" CssClass="CheckBoxTesterBla" DataSourceID="genre_film" DataTextField="genre" AutoPostBack="False" RepeatDirection="horizontal" Enabled="false">
                                </asp:CheckBoxList>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:CheckBoxList ID="GenreFilm" runat="server" CssClass="CheckBoxTesterBlap" DataSourceID="genre_film" DataTextField="genre" AutoPostBack="False" RepeatDirection="horizontal" Enabled="false">
                                </asp:CheckBoxList>
                                <asp:CheckBoxList ID="GenreShow" runat="server" CssClass="CheckBoxTester" DataSourceID="Film_Genre" DataTextField="genre" DataValueField="genre" AutoPostBack="False" OnDataBound="GenreCheck_Databound" RepeatDirection="horizontal" RepeatColumns="7">
                                </asp:CheckBoxList>
                            </EditItemTemplate>
                            <InsertItemTemplate>
                                <%--<asp:Label ID="Label2" runat="server" Text="Genre kan pas na dit scherm ingevuld worden"></asp:Label>--%>
                                <asp:CheckBoxList ID="GenreShow" runat="server" CssClass="CheckBoxTester" DataSourceID="Film_Genre" DataTextField="genre" DataValueField="genre" AutoPostBack="False" RepeatDirection="horizontal" RepeatColumns="7">
                                </asp:CheckBoxList>
                            </InsertItemTemplate>
                        </asp:TemplateField>
                        <asp:CommandField ShowInsertButton="True" ShowEditButton="True" ShowDeleteButton="True" ButtonType="Button"></asp:CommandField>
                    </Fields>
                </asp:DetailsView>
               

                <asp:SqlDataSource runat="server"
                    ID="genre_film"
                    ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>'
                    SelectCommand="SELECT genre.genre FROM film_genre INNER JOIN genre ON film_genre.genregenre = genre.genre WHERE (film_genre.filmfilm_id = @film_id)" 
                    InsertCommand="INSERT INTO film_genre(filmfilm_id, genregenre) VALUES (@film_id, @genre)">
                    <InsertParameters>
                        <asp:Parameter Name="genre"></asp:Parameter>
                        <asp:Parameter Name="film_id"></asp:Parameter>
                    </InsertParameters>
                    <SelectParameters>
                        <asp:ControlParameter ControlID="FilmGridView" PropertyName="SelectedValue" Name="film_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>

                <asp:SqlDataSource runat="server"
                    ID="kijkwijzer_film"
                    ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>'
                    SelectCommand="SELECT kijkwijzer.kijkwijzer_symbool FROM film_kijkwijzer INNER JOIN kijkwijzer ON film_kijkwijzer.kijkwijzerkijkwijzer_id = kijkwijzer.kijkwijzer_id WHERE (film_kijkwijzer.filmfilm_id = @film_id)" 
                    InsertCommand="INSERT INTO film_kijkwijzer(filmfilm_id, kijkwijzerkijkwijzer_id) VALUES (@film_id, @kijkwijzer)">
                    <InsertParameters>
                        <asp:Parameter Name="film_id"></asp:Parameter>
                        <asp:Parameter Name="kijkwijzer"></asp:Parameter>
                    </InsertParameters>
                    <SelectParameters>
                        <asp:ControlParameter ControlID="FilmGridView" PropertyName="SelectedValue" Name="film_id" Type="Int32" />
                    </SelectParameters>
                </asp:SqlDataSource>

                <asp:SqlDataSource ID="Film_Genre" runat="server" ConflictDetection="CompareAllValues" ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>' SelectCommand="SELECT * FROM [genre]"></asp:SqlDataSource>
                
                <asp:SqlDataSource ID="Film_Kijkwijzer" runat="server" ConflictDetection="CompareAllValues" ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>' SelectCommand="SELECT * FROM [kijkwijzer]"></asp:SqlDataSource>
                
                <asp:SqlDataSource runat="server" ID="Film_Select" ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>' SelectCommand="SELECT [film_id], [naam] FROM [film]"></asp:SqlDataSource>
                
                <asp:SqlDataSource runat="server" OnInserted="Film_Details_Inserted"
                    ID="Film_Details"
                    ConflictDetection="CompareAllValues"
                    ConnectionString='<%$ ConnectionStrings:debioscoopConnectionString %>'
                    DeleteCommand="DELETE FROM [film] WHERE [film_id] = @original_film_id"
                    InsertCommand="INSERT INTO [film] ([naam], [omschrijving], [omschrijving_en], [acteurs], [reggiseur], [reserveerbaar], [reserverings_percentage], [stoelen_kiezen], [rating], [preview], [prijs], [url], [jaar], [duur], [big_url], [coming_soon]) VALUES (@naam, @omschrijving, @omschrijving_en, @acteurs, @reggiseur, @reserveerbaar, @reserverings_percentage, @stoelen_kiezen, @rating, @preview, @prijs, @url, @jaar, @duur, @big_url, @coming_soon) SET @Identity = @@Identity"
                    OldValuesParameterFormatString="original_{0}"
                    SelectCommand="SELECT * FROM [film] WHERE ([film_id] = @film_id)"
                    UpdateCommand="UPDATE [film] SET [naam] = @naam, [omschrijving] = @omschrijving, [omschrijving_en] = @omschrijving_en, [acteurs] = @acteurs, [reggiseur] = @reggiseur, [reserveerbaar] = @reserveerbaar, [reserverings_percentage] = @reserverings_percentage, [stoelen_kiezen] = @stoelen_kiezen, [rating] = @rating, [preview] = @preview, [prijs] = @prijs, [url] = @url, [jaar] = @jaar, [duur] = @duur, [big_url] = @big_url, [coming_soon] = @coming_soon WHERE [film_id] = @original_film_id AND [naam] = @original_naam AND (([omschrijving] = @original_omschrijving) OR ([omschrijving] IS NULL AND @original_omschrijving IS NULL)) AND (([omschrijving_en] = @original_omschrijving_en) OR ([omschrijving_en] IS NULL AND @original_omschrijving_en IS NULL)) AND [acteurs] = @original_acteurs AND [reggiseur] = @original_reggiseur AND [reserveerbaar] = @original_reserveerbaar AND (([reserverings_percentage] = @original_reserverings_percentage) OR ([reserverings_percentage] IS NULL AND @original_reserverings_percentage IS NULL)) AND [stoelen_kiezen] = @original_stoelen_kiezen AND [rating] = @original_rating AND (([preview] = @original_preview) OR ([preview] IS NULL AND @original_preview IS NULL)) AND [prijs] = @original_prijs AND (([url] = @original_url) OR ([url] IS NULL AND @original_url IS NULL)) AND [jaar] = @original_jaar AND [duur] = @original_duur AND (([big_url] = @original_big_url) OR ([big_url] IS NULL AND @original_big_url IS NULL)) AND [coming_soon] = @original_coming_soon">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="FilmGridView" Name="film_id" PropertyName="SelectedValue" Type="Int32" />
                    </SelectParameters>
                    <DeleteParameters>
                        <asp:Parameter Name="original_film_id" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_naam" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_omschrijving" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_omschrijving_en" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_acteurs" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_reggiseur" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_reserveerbaar" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="original_reserverings_percentage" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_stoelen_kiezen" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="original_rating" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_preview" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_prijs" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_jaar" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_duur" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_big_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_coming_soon" Type="Boolean"></asp:Parameter>
                    </DeleteParameters>
                    <InsertParameters>
                        <asp:Parameter Name="naam" Type="String"></asp:Parameter>
                        <asp:Parameter Name="omschrijving" Type="String"></asp:Parameter>
                        <asp:Parameter Name="omschrijving_en" Type="String"></asp:Parameter>
                        <asp:Parameter Name="acteurs" Type="String"></asp:Parameter>
                        <asp:Parameter Name="reggiseur" Type="String"></asp:Parameter>
                        <asp:Parameter Name="reserveerbaar" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="reserverings_percentage" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="stoelen_kiezen" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="rating" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="preview" Type="String"></asp:Parameter>
                        <asp:Parameter Name="prijs" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="jaar" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="duur" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="big_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="coming_soon" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="Identity" Type="Int32" Direction="Output"></asp:Parameter>
                    </InsertParameters>
                    <UpdateParameters>
                        <asp:Parameter Name="naam" Type="String"></asp:Parameter>
                        <asp:Parameter Name="omschrijving" Type="String"></asp:Parameter>
                        <asp:Parameter Name="omschrijving_en" Type="String"></asp:Parameter>
                        <asp:Parameter Name="acteurs" Type="String"></asp:Parameter>
                        <asp:Parameter Name="reggiseur" Type="String"></asp:Parameter>
                        <asp:Parameter Name="reserveerbaar" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="reserverings_percentage" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="stoelen_kiezen" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="rating" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="preview" Type="String"></asp:Parameter>
                        <asp:Parameter Name="prijs" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="jaar" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="duur" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="big_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="coming_soon" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="original_film_id" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_naam" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_omschrijving" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_omschrijving_en" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_acteurs" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_reggiseur" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_reserveerbaar" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="original_reserverings_percentage" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_stoelen_kiezen" Type="Boolean"></asp:Parameter>
                        <asp:Parameter Name="original_rating" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_preview" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_prijs" Type="Double"></asp:Parameter>
                        <asp:Parameter Name="original_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_jaar" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_duur" Type="Int32"></asp:Parameter>
                        <asp:Parameter Name="original_big_url" Type="String"></asp:Parameter>
                        <asp:Parameter Name="original_coming_soon" Type="Boolean"></asp:Parameter>
                    </UpdateParameters>
                </asp:SqlDataSource>

            </div>
        </form>
        <div class="clearDiv"></div>
    </div>
</asp:Content>
